﻿using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace crazy.Goods
{
    [Table("goods")]
    public class Goods : AuditedAggregateRoot<Guid>
    {
        /// <summary>
        /// 商品名称
        /// </summary>
        [Required]//必填
        [StringLength(100)]//限制长度100
        public string GoodsName { get; set; }
        /// <summary>
        /// 价格
        /// </summary>
        public decimal Price { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Describe{ get; set; }
        /// <summary>
        /// 剩余数量
        /// </summary>
        public int SurplusQty { get; set; }
        public string TestAdd { get; set; }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="goodsName"></param>
        /// <param name="price"></param>
        /// <param name="describe"></param>
        /// <param name="surplusQty"></param>
        public Goods(string goodsName, decimal price, string describe,int surplusQty)
        {
            GoodsName = goodsName;
            Price = price;
            Describe = describe;
            SurplusQty = surplusQty;
        }
    }
}
